import view

'''
控制层：实现界面打印和菜单选择
'''


def main():
    while True:
        print('=======欢迎光临=========')
        print('1显示账单2写入账单3退出')
        choice = int(input('请输入选项：'))
        if choice == 1:
            view.show_book()
        elif choice == 2:
            view.write_bill()
        elif choice == 3:
            print('正在退出')
            break
        else:
            print('输入错误')


if __name__ == '__main__':
    main()
